package cn.hackcloud.netty.codec;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import org.msgpack.MessagePack;
import org.msgpack.template.Templates;

public class TestSerializable {
	public static void main(String[] args) throws IOException {
		List<String> list = new ArrayList<String>();
		list.add("赖军");
		list.add("何芳");
		list.add("赖烨林");
		MessagePack messagePack=new MessagePack();
		byte[] raw = messagePack.write(list);
		List<String> read = messagePack.read(raw,Templates.tList(Templates.TString));
		System.out.println(read.get(0));
		System.out.println(read.get(1));
		System.out.println(read.get(2));
	}
	
}
